package com.pdg.mcplugin.ranger.dataproviders;

import java.io.File;

import com.pdg.mcplugin.common.baseclasses.DataProviderBase;
import com.pdg.mcplugin.ranger.Ranger;

public class DataProvider extends DataProviderBase<Ranger> {

	private static final String CONNECTION_STRING = "jdbc:sqlite:%s"+ File.separator + "ranger.db";

	private PlaceNameTableProvider placeNameTableProvider = null;
	public PlaceNameTableProvider getPlaceNameTableProvider(){
		if(placeNameTableProvider==null){
			placeNameTableProvider = new PlaceNameTableProvider(this);
		}
		return placeNameTableProvider;
	}
	
	
	public DataProvider(Ranger thePlugin) {
		super(thePlugin, CONNECTION_STRING);
	}


	private PublicPlaceNameTableProvider publicPlaceNameTableProvider = null;
	public PublicPlaceNameTableProvider getPublicPlaceNameTableProvider() {
		if(publicPlaceNameTableProvider==null){
			publicPlaceNameTableProvider = new PublicPlaceNameTableProvider(this); 
		}
		return publicPlaceNameTableProvider;
	}

}
